package com.lzb.watermarkcamera.adapter;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.lzb.watermarkcamera.R;
import com.lzb.watermarkcamera.basic.ProviderMultiAdapter;
import com.lzb.watermarkcamera.bean.DelayBean;


public class DelayAdapter extends ProviderMultiAdapter<DelayBean> {

    public DelayAdapter() {
        addItemProvider(new DelayProvider());
    }

    private class DelayProvider extends BaseItemProvider<DelayBean> {
        @Override
        public int getItemViewType() {
            return ProviderMultiAdapter.TYPE_VIEW;
        }

        @Override
        public int getLayoutId() {
            return R.layout.item_delay;
        }

        @Override
        public void convert(@NonNull BaseViewHolder baseViewHolder, DelayBean bean) {
            baseViewHolder.setImageResource(R.id.ivDelayItemImg, bean.getImg());
        }
    }

}
